package com.xingxuecn.limit.service.impl;

import com.xingxuecn.limit.common.model.User;
import com.xingxuecn.limit.common.model.vo.Page;
import com.xingxuecn.limit.dao.UserDao;
import com.xingxuecn.limit.dao.impl.UserDaoImpl;
import com.xingxuecn.limit.service.UserService;

import java.sql.SQLException;
import java.util.List;

/**
 * @author Zy at 2018/9/11 0011 上午 11:00
 */
public class UserServiceImpl implements UserService {
    private UserDao userDao = new UserDaoImpl();

    @Override
    public List<User> findAll() throws SQLException {
        return userDao.findAll();
    }

    @Override
    public List<User> search(User user) throws SQLException {
        return userDao.search(user);
    }

    @Override
    public int add(User user) throws SQLException {
        return userDao.add(user);
    }

    @Override
    public int update(User user) throws SQLException {
        return userDao.update(user);
    }

    @Override
    public int delete(Integer id) throws SQLException {
        return userDao.delete(id);
    }

    @Override
    public Page searchPage(User user, Integer page, Integer rows) throws SQLException {
        return null;
    }
}